<?
	$cmd = $_REQUEST['cmd'];
	$url = $_REQUEST['url'];
	include_once('classes/gbif.eml.php');
	include_once('classes/class.transform.php');
	define(BASE_PATH, "../");
	switch( $cmd ) {
		case 'convert2dwca':		
			$tf = new Transform();
			$tf->sourcefile = "../templates/Template-Occurrence-1.0.xlsx";
#			$tf->convert2csv();
			$tf->createEml();
			break;
			
		case 'convert2eml':
			$tf = new Transform();
			$tf-> sourcefile = "../examples/saeol/Template-Species and VernacularNames1.2.xls";
			$tf->createEml();
			print "<pre>";
			print_r($tf->eml->data);
//			$tf->eml->generateXml();
			break;
			
		case 'convert2csv':
			error_reporting(E_ALL);
//					->save(str_replace('.php', '.csv', __FILE__));
			break;
	}

?>